import request from '@/utils/request'

// 查询整经数据汇总列表
export function listWarp(query) {
  return request({
    url: '/mesana/warp/list',
    method: 'get',
    params: query
  })
}

// 查询大屏中的数据
export function listCurMachine(){
  return request({
    url:'/mesana/warp/getScreenData',
    method:'get',
    }
  )
}

// 从数据库找上一个轴
export function selectNewestZhou(maccode) {
  return request({
    url: '/mesana/warp/selectNewestZhou/' + maccode,
    method: 'get'
  })
}

// 查询整经数据汇总详细
export function getWarp(id) {
  return request({
    url: '/mesana/warp/' + id,
    method: 'get'
  })
}

// 根据轴号查询实时长度
export function getCurlength(shaftCode){
  return request({
    url:'/mesana/warp/getCurlength/' + shaftCode,
    method: 'get'
  })
}

// 落轴
export function luozhouoperation(id) {
  return request({
    url: '/mesana/warp/luozhouoperation/' + id,
    method: 'post'
  })
}
// 查询当前班次和类型

export function getShiftDataAndType() {
  return request({
    url: '/mesana/warp/getShiftDataAndType/',
    method: 'get'
  })
}

// 查询一些初始化数据
export function getInitData() {
  return request({
    url: '/mesana/warp/getInitData',
    method: 'get'
  })
}



// 新增整经数据汇总
export function addWarp(data) {
  return request({
    url: '/mesana/warp',
    method: 'post',
    data: data
  })
}

// 修改整经数据汇总
export function updateWarp(data) {
  return request({
    url: '/mesana/warp',
    method: 'put',
    data: data
  })
}

// 删除整经数据汇总
export function delWarp(id) {
  return request({
    url: '/mesana/warp/' + id,
    method: 'delete'
  })
}

// 导出整经数据汇总
export function exportWarp(query) {
  return request({
    url: '/mesana/warp/export',
    method: 'get',
    params: query
  })
}


export function bancireport(query) {
  return request({
    url: '/mesana/warp/bancireport',
    method: 'get',
    params: query
  })
}


export function pdtreport(query) {
  return request({
    url: '/mesana/warp/pdtreport',
    method: 'get',
    params: query
  })
}
